import request from "@/api/request.ts";
import {loginForm,loginRes,userInfo} from '@/api/user/type.ts'

enum API_URL{
  LOGING_URL="/anonymous/api/v1/user/login",
  USER_INFO_URL="/api/v1/user/findCurrentUserInfo"
}
export const reqLogin = (data:loginForm) : Promise<loginRes> => {
  return request.post(API_URL.LOGING_URL, data);
}

export const getUserInfo = () : Promise<userInfo> => {
  return request.get(API_URL.USER_INFO_URL);
}

